package com.itkaien.javaeebased.networkprogerma;

import java.io.*;

public class FileUpLoad {

    public static void main(String[] args) throws IOException {

        FileInputStream fileInputStream = new FileInputStream("img.png");
        FileOutputStream fileOutputStream = new FileOutputStream("imgcopy.jpg");
        int len;
        byte[] buffer=new byte[2048];
        while (fileInputStream.read(buffer) != -1)  {
            fileOutputStream.write(buffer);
        }

        System.out.println("文件上传成功");

    }

}
